using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class EnemySpwan : MonoBehaviour
{
    public GameObject EnemyPreb;
    private float time;
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        time += Time.deltaTime;

        if (time > 3)
        {
            time = 0;
            Instantiate(EnemyPreb,transform.position,transform.rotation);
        }
    }
}
